package com.bytezero.databasetest;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
    private MyDatabaseHelper dbHelper;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

//        dbHelper = new MyDatabaseHelper(this,"BookStore.db",null,1);
        dbHelper = new MyDatabaseHelper(this,"BookStore.db",null,2);
        Button createdatabase = findViewById(R.id.create_database);
        createdatabase.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                dbHelper.getWritableDatabase();
            }
        });
    }
}